<?php echo $html->docType('xhtml-trans'); ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title><?php echo $title_for_layout?></title>
        <?php
    //        echo $html->meta('icon');
            
            echo $html->css(
                array(
                    'admin/style', 
                    
                )
            );
            echo $common->js(
                array(
                    'jquery', 
                    'clock', 
                ),
                'admin_login_'
            );
            
        ?>
        <?php echo $scripts_for_layout ?>
		
        <?php if(isset($error) || $flash_type=="success"): ?>
        
        <script type="text/javascript">
            $(document).ready(function(){  
                if($('.flash_box p').text()!=''){
                    $('.flash_box').fadeIn(500)
                }
            })
        </script>
        <?php endif ?>
        
	</head>

<body class="login">
<?php echo $this->element('admin/header'); ?>           
<div class="outer_middle oh">
    
    <div class="login_area">
        
        <div class="inner oh">
            
            <div class="<?php echo $flash_type?> flash_box" style="display: none; width: 50%; text-align: left; margin: 10px auto; overflow: hidden; float: none;">
                <div class="<?php echo $flash_type?>_icon"></div>
                <div class="desc">
                    <span><?php echo ucfirst($flash_type)?>!</span>
                    <p><?php echo strip_tags($session->flash('auth')); ?><?php echo strip_tags($session->flash()); ?></p>
                </div>
            </div>
            <dl class="login_form">
                <dd>
                    <?php echo $form->create('User', array('action' => 'admin_login')); 
                    function textfocus($str){
                        return "if(this.value=='".$str."')this.value='';";
                    }
                    function textblur($str){
                        return "if(this.value=='')this.value='".$str."';";
                    }
                    ?>
                        <div>
                            <h2 class="title">Authenticate yourself !</h2>     
                            <hr class="divider mb10 mt10"/>
                            <?php echo $form->input('User.username',array('label'=>false,'div'=>false,'class'=>'text big mt10','value'=>'YOUR USERNAME','onblur'=>textblur('YOUR USERNAME'),'onfocus'=>textfocus('YOUR USERNAME'))); ?>
                            <?php echo $form->input('User.fakePsswrd',array('label'=>false,'div'=>false,'class'=>'text big mt15','value'=>'PASSWORD','onfocus'=>"this.style.display='none'; document.getElementById('UserPassword').style.display='block';document.getElementById('UserPassword').focus();")); ?>
                            <?php echo $form->input('User.password',array('label'=>false,'div'=>false,'class'=>'text big mt15','style'=>'display:none','onblur'=>"if(this.value==''){this.style.display='none'; document.getElementById('UserFakePsswrd').style.display='block';}")); ?>
                            <!--<input class="text big mt10" name="date[User][username]" type="text"  value="YOUR EMAIL"/>
                            <input class="text big mt15" name="date[User][password]" type="text" value="PASSWORD"/>
                            -->
                            <label class="mt10"><input class="checkbox" name="rememver" type="checkbox" /> Remember me</label>    
                            <b class="button mt15"><b><input  type="submit" value="Login"></b></b>
                            
                        </div> 
                    <?php echo $form->end();?>
                </dd>
                <dd >
                    <?php echo $form->create('User', array('url' => '/users/recover')); ?>
                        <div class="recover">
                            <strong>Don'tworry if you forgot your user name or password</strong>   <br clear="all" />
                            its easy! Just write down the email address that you have used in your profile and submit it. We will send you the user name with a new password. You can customize your profile after login with the new password.
                            <?php echo $form->input('User.email',array('label'=>false,'div'=>false,'class'=>'text big mt25','value'=>'YOUR EMAIL','onblur'=>textblur('YOUR EMAIL'),'onfocus'=>textfocus('YOUR EMAIL'))); ?>
                            <b class="button mt15"><b><input  type="submit" value="Reset Password"></b></b>
                        </div>
                    <?php echo $form->end();?>
                    
                </dd>
            </dl>
        </div>
    </div>
</div>
<?php echo $this->element('admin/footer'); ?>           
</body>    
<!--<body>
    
	<div id="container">
		<h1><?php echo $site_title ?></h1>
		<div id="box">
		
			
            <p class="main">
                <label>Username: </label>
                <?php echo $form->input('User.username',array('label'=>false,'div'=>false)); ?>
                <label>Password: </label>
                <?php echo $form->input('User.password',array('label'=>false,'div'=>false)); ?>
            </p>
            <p class="space">
                
                <input type="submit" value="Login" class="login" />
            </p>
			
		</div>
	</div>
</body>-->
</html>